package cn.edu.gzhu.workOrderManagement.config;

import cn.edu.gzhu.workOrderManagement.service.impl.SensitiveWordServiceImpl;
import com.github.houbb.sensitive.word.bs.SensitiveWordBs;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SensitiveWordsConfig {

    @Autowired
    private SensitiveWordServiceImpl sensitiveWordService; // 自定义敏感词实现

    @Bean
    public SensitiveWordBs sensitiveWordBs() {
        return SensitiveWordBs.newInstance()
                .wordDeny(sensitiveWordService)
                .init();
    }
}
